package com.nuoniu.sibanyun.entity.crm.call;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 客户管理-外呼管理-外呼记录
 * </p>
 *
 * @author 白强
 * @since 2022-02-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("crm_call_task_record")
@ApiModel(value="CrmCallTaskRecord对象", description="客户管理-外呼管理-外呼记录")
public class CrmCallTaskRecord extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "租户ID")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "呼叫任务ID")
    @TableField("crm_call_task_id")
    private Integer crmCallTaskId;

    @ApiModelProperty(value = "呼叫任务名称")
    @TableField("crm_call_task_name")
    private String crmCallTaskName;

    @ApiModelProperty(value = "呼叫任务ID")
    @TableField("crm_call_task_detail_id")
    private Long crmCallTaskDetailId;

    @ApiModelProperty(value = "客户ID")
    @TableField("crm_id")
    private Integer crmId;

    @ApiModelProperty(value = "客户名称")
    @TableField("crm_name")
    private String crmName;

    @ApiModelProperty(value = "联系人ID")
    @TableField("link_man_id")
    private Integer linkManId;

    @ApiModelProperty(value = "联系人姓名")
    @TableField("link_man_name")
    private String linkManName;

    @ApiModelProperty(value = "服务提供商 YW (亿维) XY(祥云)")
    @TableField("service_provider")
    private String serviceProvider;

    @ApiModelProperty(value = "当前通话id")
    @TableField("talk_id")
    private String talkId;

    @ApiModelProperty(value = "性别")
    @TableField("gender")
    private String gender;

    @ApiModelProperty(value = "通话类型 0 呼入 1呼出")
    @TableField("call_type")
    private Integer callType;

    @ApiModelProperty(value = "主叫号码")
    @TableField("caller")
    private String caller;

    @ApiModelProperty(value = "被叫号码")
    @TableField("callee")
    private String callee;

    @ApiModelProperty(value = "风控类型 1:正常呼叫，2:使用补线    3:拒绝呼叫 ， 4:配置有问题             原因从reason中取")
    @TableField("risk_type")
    private Integer riskType;

    @ApiModelProperty(value = "风控原因")
    @TableField("risk_reason")
    private String riskReason;

    @ApiModelProperty(value = "拨打状态 0.未拨打 1.已拨打")
    @TableField("call_status")
    private Boolean callStatus;

    @ApiModelProperty(value = "接通状态 0 未接通 1 已接通")
    @TableField("call_result")
    private Integer callResult;

    @ApiModelProperty(value = "呼叫结果 0 未接通坐席未接 1 未接通用户拒接 2 未接通用户不可达 3 未接通坐席取消 " +
            "4 接通坐席挂断  5 接通用户挂断 6 未接通系统挂断 6.1 无可用坐席 6.2 语音通知场景语音播放完系统自动挂断  " +
            "7 未接通用户取消 8 未接通用户未接 99 双呼成功")
    @TableField("call_result_state")
    private String callResultState;

    @ApiModelProperty(value = "呼叫结果说明")
    @TableField("call_result_state_remark")
    private String callResultStateRemark;

    @ApiModelProperty(value = "通话时长(秒)")
    @TableField("talk_time")
    private Integer talkTime;

    @ApiModelProperty(value = "通话时长(天时分秒)")
    @TableField("talk_time_str")
    private String talkTimeStr;

    @ApiModelProperty(value = "返回文本")
    @TableField("call_back_Json")
    private String callBackJson;


    @ApiModelProperty(value = "语音存放地址")
    @TableField("call_audio_path")
    private String callAudioPath;

    @ApiModelProperty(value = "语音下载地址")
    @TableField("call_audio_remote_path")
    private String callAudioRemotePath;

    @ApiModelProperty(value = "使用分钟数")
    @TableField("used_minutes")
    private Integer usedMinutes;

    @ApiModelProperty(value = "创建人ID")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人姓名")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "外呼应用ID")
    @TableField("call_app_id")
    private Integer callAppId;

}
